package com.langfeiyes.pattern.factory.simple;

//华为工厂
public class HWProductFactory {
    //根据产品类型生成产品
    public HWProduct produce(String type){
        if("hwphone".equals(type)){
            return new HWPhoneProduct();
        }else if("hwcomputer".equals(type)){
            return new HWComputerProduct();
        }
        return null;
    }
}
